#define _CRT_SECURE_NO_WARNINGS 1

#include<iostream>
#include<vector>
#include<cassert>
using namespace std;

#include"vector.h"

struct pos
{
	int _a;
	int _b;

	pos(int a = 90, int b = 90)
		:_a(a)
		,_b(b)
	{}

};

int main1()
{
	bit::vector<int> const v1({1,2,3,4,5,6});
	bit::vector<int>::const_reverse_iterator it1 = v1.crbegin();
	while (it1 != v1.crend())
	{
		//*it1 += 10;
		cout << *it1 << ' ';
		it1++;
	}
	cout << endl;
	it1 = v1.crbegin();
	while (it1 != v1.crend())
	{
		cout << *it1 << ' ';
		it1++;
	}
	return 0;
}

int main()
{
	bit::vector<int> v1({ 1,2,3,4,5,6 });
	bit::vector<int>::reverse_iterator it1 = v1.rbegin();
	while (it1 != v1.rend())
	{
		*it1 += 10;
		cout << *it1 << ' ';
		it1++;
	}
	cout << endl;
	it1 = v1.rbegin();
	while (it1 != v1.rend())
	{
		cout << *it1 << ' ';
		it1++;
	}
	return 0;
}

int main2()
{
	bit::vector<pos> v1;
	v1.push_back(pos(100, 200));
	v1.push_back(pos(200, 200));
	v1.push_back(pos(300, 200));

	bit::vector<pos>::reverse_iterator it1 = v1.rbegin();
	cout << it1->_a << endl;
	return 0;
}

//int main()
//{
//	//int a = 0;
//	//const int& b = a;
//	//int c = b;
//	int a = 0;
//	int* p = &a;
//	const int*& pp = p;
//	int* q = pp;
//	return 0;
//}
